<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ include file="includes/common.jsp" %>
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
    <head>
        <meta name="META_MAIN_MENU_ID" content="${currentCategory.uid }" />
        <title>${article.name}</title>
        <meta name="search" content="article" />
        <meta name="author" content="chunhai.chen(15317227@qq.com)" />
        <meta name="description" content="肥猫 肥猫数据 ${currentCategory.name}文章"  /> 
    </head>
    <body>
        <c:if test="${not empty currentCategory && not empty primaryCategoryTrail}">
            <c:set var="trailLinks" value="">
            </c:set>
            <c:forEach items="${primaryCategoryTrail}" var="v" varStatus="vst">
                <c:set var="tmp" value="<span class='sep'>› </span><a href='/articles/${v.uid}.htm' alt='肥猫 肥猫数据 ${currentCategory.name}文章 ${v.name}' title='肥猫 肥猫数据 ${currentCategory.name}文章 ${v.name}'>${v.name}</a>"/>
                <c:set var="trailLinks" value="${trailLinks}${tmp}">
                </c:set>
            </c:forEach>
			<c:if test="${not empty article}"><c:set var="pname" value="<span class='sep'>› </span><span class='current'>${article.name}</span>"></c:set></c:if>
        </c:if>
		<c:set var="requester" value="<%=request.getServerName()+ (request.getServerPort()==80 ? "" : ":"+request.getServerPort())%>"/>

		<div class="place">
			<a href="/home.htm" title="转到首页">首页</a> ${trailLinks }<span class='sep'>› </span> ${article.name }			
		</div>
    	<c:choose>
        <c:when test="${not empty article}">				  
			<div id="post-910" class="post">
            	<div class="date"><span><fmt:formatDate value="${article.statusUpdated }" pattern="yyyy"></fmt:formatDate></span><span class="f"><fmt:formatDate value="${article.statusUpdated }" pattern="MM-dd"></fmt:formatDate></span></div>
            	<h2>
            		<a rel="bookmark" href="/article/${article.uid }.htm" class="title">${article.name }</a>
            		<c:if test="${article.topped }">[置顶]</c:if><c:if test="${article.pubadv }">[公告]</c:if>
            	</h2>
				<div class="info">
					<c:if test="${not empty article.author }">
					<span class="author"><a title="由 ${article.author.name } 发表" href="http://${article.author.blogUrl }">${article.author.name }</a></span>
					</c:if>
					<%-- 
					<span class="categories"><a rel="category tag" title="查看 Wordpress 的全部文章" href="http://www.xiaohan86.com/category/wordpress-tips">Wordpress</a></span>
					--%>
                    <c:if test="${not empty article.tags }">
	                    <span class="tags">
		                    <c:forTokens var="tag" items="${article.tags }" delims=",; " ><a rel="tag" href="/articles/tag/${tag }.htm">${tag }</a>&nbsp;&nbsp;</c:forTokens>	                    	
	                    </span>
                    </c:if>
                    <span class="comments"><a title="${article.name } 上的评论" class="Comments off" href="/article/${article.uid }.htm#comments"><em>${article.commentCount }</em> 回复</a></span>
                    <span class="addcomment"><a href="#respond">发表评论</a></span>
					<div class="clear"></div>
				</div>
				<div id="a910" class="con">
					${article.longDesc }
					<div class="clear"></div>
				</div>
                <div class="under">
					<p>文章作者：<a href="http://${article.author.blogUrl }">${article.author.name }</a>
					<br>本文地址：<a href="http://${article.author.blogUrl }/article/${article.uid }.htm">http://${article.author.blogUrl }/article/${article.uid }.htm</a>
					<br>版权所有 &copy; 转载时必须以链接形式注明作者和原始出处！
						<span style="float:right;"><A href="/person/reprint/article/${article.uid }.htm">转载到我的博客&gt;&gt;</A></span>
					</p>
				</div>
            </div>
            
            
            
			<div id="postnavi">
				<span class="prev">« <a rel="next" href="http://www.xiaohan86.com/201009919.html">WordPress3.01自定义导航菜单的使用教程</a></span>
				<span class="next"><a rel="prev" href="http://www.xiaohan86.com/201008886.html">DEDECMS给栏目增加缩略图的功能</a> »</span>
				<div class="clear"></div>
			</div>
				   
			<c:if test="${not empty similarArticles }">	   
			<div class="like">
				<h4>或许你会感兴趣的文章</h4>
				<ul>
				<c:forEach items="${similarArticles}" var="v" varStatus="vst">
					<li><span><fmt:formatDate value="${v.statusUpdated }" pattern="yyyy-MM-dd"></fmt:formatDate></span><a title="${v.name }" rel="bookmark" href="/article/${v.uid }.htm">${v.name }</a></li>
				</c:forEach>
				</ul>
			</div>			            				  
			</c:if>	    
			
			<div class="comment_box">
				<c:if test="${not empty articleComments }">
				<h3 id="comments">${article.commentCount } 回复至 “${article.name }”</h3>
				<ol class="commentlist">
					<c:forEach items="${articleComments}" var="v" varStatus="vst">
					<li class="comment" id="comment-${v.uid}">
						<div class="cheader regularheader">
							<img width="32" height="32" class="avatar avatar-32 photo" src="/avatar/icon/${v.author.uid}.avatar" alt="">                
							<div class="item">
			                	<span class="lou"><a href="#comment-${v.uid}">#${v.uid}</a></span>
								<span class="items">
									<a href="/article/${article.uid }.htm#respond" id="${v.uid}" class="comment-reply-link" rel="nofollow">回复</a> 
									| <a href="/article/${article.uid }.htm#respond" id="${v.uid}" class="comment-reply-ref" rel="nofollow">引用</a>
									<%--| <a onclick="MGJS_CMT.quote('commentauthor-${v.uid}', 'comment-${v.uid}', 'commentbody-${v.uid}', 'comment');" href="javascript:void(0);">只看本题回复</a> --%>
								</span>
								<span class="cdate">
									<a target="_blank" title="${v.author.name }" rel="external nofollow" href="http://${v.author.blogUrl }">							
									<span id="commentauthor-${v.uid}">${v.author.name }</span>
									</a>								
									&nbsp;回复: <fmt:formatDate value="${v.created }" pattern="yyyy-MM-dd HH:mm"></fmt:formatDate> </span>
								<div class="clear"></div>
			                </div>
						</div>
						<div id="commentbody-${v.uid}" class="cbody">
							<p>${v.comment }</p>
						</div>
 						<div class="signaturebox" id="http://${v.author.blogUrl }/avatar/signature/${v.author.uid }.htm">
						</div>						
						<div class="clear"></div>			
					</li>
					</c:forEach>
				</ol>
				</c:if>
				
				<div id="respond">
					<form method="post" action="/person/comment/article/${article.uid }.htm" name="commentform" id="commentform">
						<h3>发表评论</h3>
						<a style="display: none;" href="/201008910.html#respond" id="cancel-comment-reply-link" rel="nofollow">Cancel reply</a>				
						<div class="form_box">
			        		<div class="text"><textarea tabindex="4" rows="8" cols="64" class="textarea" id="comment" name="comment"></textarea></div>
							<div class="form_info">
								<input type="hidden" value="0" id="parentCommentUid" name="parentCommentUid">
								
								<div class="part">
									<input type="submit" value="提交评论 (Ctrl+Enter)" tabindex="5" class="button" id="submit">
								</div>				
							</div>
			
							<div class="clear"></div>
						</div>
						<p>
							有人回复时会自动通知到你的博客网站
							<c:choose>
								<c:when test="${not empty sessionScope.SESSION_PERSON }">
									<c:choose>
										<c:when test="${not empty sessionScope.SESSION_PERSON.blogUrl }">：<A href="http://${sessionScope.SESSION_PERSON.blogUrl }" target=_blank>${sessionScope.SESSION_PERSON.blogUrl}</A></c:when>
										<c:otherwise>没有设置博客地址，<A href="/person/home.htm">请查看个人资料设置</A></c:otherwise>
									</c:choose>
								</c:when>
								<c:otherwise>还没有登录，<A href="/person/comment/article/${article.uid }.htm">请登录后发表评论</A></c:otherwise>
							</c:choose>
						</p>	
					</form>
				</div>
				<script type="text/javascript">
				    var commenttextarea = document.getElementById('comment');
				    commenttextarea.onkeydown = function quickSubmit(e) {
				        if (!e) var e = window.event;
				        if (e.ctrlKey && e.keyCode == 13){
				            document.getElementById('submit').click();
				        }
				    }
				</script>            
				
			</div>			
        </c:when>
        <c:otherwise>
            <div class="header">
               <h2>博文不存在</h2>
            </div>
        </c:otherwise>
        </c:choose>
        
		<c:if test="${not empty sameGroupArticles }">
        	<content tag="sidebar">
				<div class="block">
					<h3>${article.groupTag }</h3>
		        	<ul>            	 
						<c:forEach items="${sameGroupArticles}" var="v" varStatus="vst">
			                <li><a title="${v.name }" href="/article/${v.uid }.htm">${v.name }</a></li>
		                </c:forEach>
					</ul>
				</div>                 
			</content>
        </c:if>
        
    
        	<content tag="adminLinks">
				【<A href='/admin/article/edit.htm?uid=${article.uid }'>编辑${article.name }</A>】&nbsp;
			</content>        
    </body>
</html>
